<style>
div.form label {
    float: left;
    font-weight: bold;
    margin: 0 5px 3px 0;
    overflow: hidden;
    text-align: left;
    width: 150px;
}
div.form label.labelForRadio {
	display:inline-block;
	width:50px;
	float:none;
	margin:0 auto;
}
</style>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'activity-form',
	'enableAjaxValidation'=>false,
)); ?>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'activityname'); ?>
		<?php echo $form->textField($model,'activityname',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'activityname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'prizeid'); ?>
		<?php echo $form->dropDownList($model,'prizeid',CHtml::listData($prize,'prizeid','prizename')); ?>
		<?php echo $form->error($model,'prizeid'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'class'); ?>
		<?php echo $form->dropDownList($model,'class',Yii::app()->params['activityclasses']); ?>
		<?php echo $form->error($model,'class'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'starttime'); ?>
		<?php 
		$this->widget('application.extensions.timepicker.timepicker', array(
			'model'=>$model,
			'name'=>'starttime',
		));
		?>
		<?php echo $form->error($model,'starttime'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'winner'); ?>
		<?php echo $form->textField($model,'winner'); ?>
		<?php echo $form->error($model,'winner'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'times'); ?>
		<?php echo $form->textField($model,'times'); ?>
		<?php echo $form->error($model,'times'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'people'); ?>
		<?php echo $form->textField($model,'people'); ?>
		<?php echo $form->error($model,'people'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'hongyun'); ?>
		<?php echo $form->textField($model,'hongyun'); ?>
		<?php echo $form->error($model,'hongyun'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'code'); ?>
		<?php echo $form->textField($model,'code',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'code'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'code_time'); ?>
		<?php echo $form->textField($model,'code_time'); ?>（秒）
		<?php echo $form->error($model,'code_time'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'delaytime'); ?>
		<?php echo $form->textField($model,'delaytime'); ?>（秒）
		<?php echo $form->error($model,'delaytime'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'movie_url'); ?>
		<?php echo $form->textField($model,'movie_url',array('size'=>60,'maxlength'=>60)); ?>
		<?php echo $form->error($model,'movie_url'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'game_url'); ?>
		<?php echo $form->textField($model,'game_url',array('size'=>60,'maxlength'=>60)); ?>
		<?php echo $form->error($model,'game_url'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'poll_url'); ?>
		<?php echo $form->textField($model,'poll_url',array('size'=>60,'maxlength'=>60)); ?>
		<?php echo $form->error($model,'poll_url'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'new'); ?>
		<?php
		$this->widget('application.extensions.kindeditor4.KindEditorWidget',
				array('model' => $model,'attribute' => 'new',
					'htmlOptions'=>array('style' => 'width:100px;'),
					'miniMode'=>true,'editorname'=>'detail_editor'));
		?>
		<?php echo $form->error($model,'new'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'notice'); ?>
		<?php
		$this->widget('application.extensions.kindeditor4.KindEditorWidget',
				array('model' => $model,'attribute' => 'notice',
					'htmlOptions'=>array('style' => 'width:100px;'),
					'miniMode'=>true,'editorname'=>'detail_editor'));
		?>
		<?php echo $form->error($model,'notice'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'hot'); ?>
		<?php echo $form->textField($model,'hot'); ?>
		<?php echo $form->error($model,'hot'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->